package com.efesco.service.hirefire;

import com.bstek.dorado.common.*;
import com.bstek.dorado.data.*;
import com.bstek.dorado.data.db.DBStatement;
import com.bstek.dorado.view.*;
import com.bstek.dorado.view.data.*;
import com.bstek.dorado.view.control.*;

/**
 * V_fire_listViewModel
 */
public class V_fire_listViewModel extends DefaultViewModel {
  protected void doUpdateData(ParameterSet parameters, ParameterSet outParameters)
      throws Exception {
	  
   Dataset ds =getDataset("dataset_fire_list");
   DBStatement stmt = new DBStatement();
   RecordIterator iter = ds.recordIterator();
   while(iter.hasNext()){
 	  Record record = iter.nextRecord();        
      stmt.setSql("update s_employee_hire_fire set status=4,fire_memo='" + record.getString("FIRE_MEMO")+"' where EMPLOYEE_HIRE_FIRE_ID="+record.getLong("EMPLOYEE_HIRE_FIRE_ID"));
      stmt.execute();
   }
   stmt.close();
   // super.doUpdateData(parameters, outParameters);
  }

}
